﻿@model Jingxing.Models.Admin.CommentMgtModel
@{
    ViewBag.Title = "警兴 - 留言管理";
    Model.Caption = "留言管理";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
@using (Html.BeginForm(new { act = "submit" }))
{
    var grid = new WebGrid(source: Model.List, rowsPerPage: 30);
    @grid.GetHtml(
        htmlAttributes: new { cellpadding = "0", cellspacing = "0" },
        headerStyle: "ui-li ui-li-divider ui-btn ui-bar-a ui-btn-hover-undefined ui-btn-up-undefined",
    columns: grid.Columns
        (
            grid.Column("Name", "留言者"),
            grid.Column("DateTime", "留言时间"),
            grid.Column("ContentTxt", "内容"),
            grid.Column("LastReply", "最新回复"),
            grid.Column(header: "评论",format: (item) => Html.ActionLink("评论", "Reply", new { id = item.Id }), canSort: false),
            grid.Column(header: "删除", format: (item) => Html.ActionLink("删除", "CommentDelete", new { id = item.Id }), canSort: false)
        )
    )
}